﻿{include file="header.tpl"}
<div id="block_featured" class="block">
	<img src="images/theme/ribbon.png" class="ribbon"/>
	<span class="ribbon_text">{$title}</span>
    <div class="block_inside">
	
	{$info_action}
	
	<div class="user_panel">
		<ul>
			<li class="kategoria"><div class="naglowek"><a class="link rss" href="#">Moja praktyka</a></div>
				<ul class="fade">
					<li>
						<div class="text">
							<ul>

								{$info_practice}

								{if isset($practiceDetails)}
									{foreach item=p from=$practice}{/foreach}
									{foreach item=c from=$company} {/foreach}
									{foreach item=pe from=$person} {/foreach}
								<div class="grid_5">
									<h2>Szczegóły praktyki</h2>
									<table>
										<tr class="tr_gray">
											<td class="td_left">Data dodania</td>
											<td class="td_right">{$p.add_date}</td>
										</tr>
										<tr>
											<td class="td_left">Od dnia</td>
											<td class="td_right">{$p.date_start}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Do dnia</td>
											<td class="td_right">{$p.date_end}</td>
										</tr>
										<tr>
											<td class="td_left">Praktyka płatna</td>
											<td class="td_right">{if $p.paid == 1 }TAK {else} NIE {/if}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Zakres obowiązków</td>
											<td class="td_right">{$p.duties}</td>
										</tr>
										<tr>
											<td class="td_left">Wymagania</td>
											<td class="td_right">{$p.requirements}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Technologie</td>
											<td class="td_right">{$p.technology}</td>
										</tr>
									</table>
								</div>
								<div class="grid_5">
									<h2>Szczegóły praktyki</h2>
									<table>
										<tr class="tr_gray">
											<td class="td_left">Data dodania</td>
											<td class="td_right">{$p.add_date}</td>
										</tr>
										<tr>
											<td class="td_left">Od dnia</td>
											<td class="td_right">{$p.date_start}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Do dnia</td>
											<td class="td_right">{$p.date_end}</td>
										</tr>
										<tr>
											<td class="td_left">Praktyka płatna</td>
											<td class="td_right">{if $p.paid == 1 }TAK {else} NIE {/if}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Zakres obowiązków</td>
											<td class="td_right">{$p.duties}</td>
										</tr>
										<tr>
											<td class="td_left">Wymagania</td>
											<td class="td_right">{$p.requirements}</td>
										</tr>
										<tr class="tr_gray">
											<td class="td_left">Technologie</td>
											<td class="td_right">{$p.technology}</td>
										</tr>
									</table>							
								</div>
								<div class="clear"></div>
								{/if}
							</ul>  
						</div>
					</li>  
				</ul>
			</li>
			<li class="kategoria"><div class="naglowek"><a class="link rss" href="#">Moje dane</a></div>
				<ul class="fade">
					<li>
						<div class="text">
							<ul>
								{foreach item = student from=$smarty.session.student_info}{/foreach}
								<table>
									<tr class="tr_gray">
										<td class="td_left">Imię</td>
										<td class="td_right">{$student.name}</td>
									</tr>
									<tr>
										<td class="td_left">Nazwisko</td>
										<td class="td_right">{$student.surname}</td>
									</tr>
									<tr class="tr_gray">
										<td class="td_left">Email</td>
										<td class="td_right">{$student.email}</td>
									</tr>
									<tr>
										<td class="td_left">Numer albumu</td>
										<td class="td_right">{$student.album_nr}</td>
									</tr>
									<tr class="tr_gray">
										<td class="td_left">Wydział</td>
										<td class="td_right">{$faculty}</td>
									</tr>
									<tr>
										<td class="td_left">Kierunek</td>
										<td class="td_right">{$specialization}</td>
									</tr>	
								</table>
							</ul>  
						</div>
					</li>  
				</ul>
			</li>
			<li class="kategoria"><div class="naglowek"><a class="link rss" href="#">Zmień dane</a></div>
				<ul class="fade">
					<li>
						<div class="text">
							<ul>
								<label for="change" class="label">Co chcesz zmienić ?</label>						
								<select id="select_change_data" class="input">
									<option value = "no_choice">-- wybierz --</option>
									<option value = "email">Email</option>
									<option value = "album">Nr albumu</option>
									<option value = "faculty">Wydział i kierunek</option>
									<option value = "password">Hasło</option>
								</select>
								<br/>
								<br/>
								<div id="change_email" class = "change_data_div">
									<form method="post" method="user_panel.php">
										<table>
											<tr>
												<td><label for="new_email" class="label">Nowy email</label></td>
												<td><input type="text" class="input" id="new_email" name="new_email" /></td>
											</tr>
											<tr>
												<td><br/><input type="submit" name="submit_change_email" id="submit_change_email" value="Zmień" class="button" /></td>
												<td></td>
											</tr>
										</table>
									</form>
								</div>
								
								<div id="change_album" class = "change_data_div">
									<form method="post" method="user_panel.php">
										<table>
											<tr>
												<td><label for="new_album" class ="label">Nowy nr albumu</label></td>
												<td><input type="text" class="input" id="new_album" name="new_album" /></td>
											</tr>
											<tr>
												<td><br/><input type="submit" name="submit_change_album" id="submit_change_album" value="Zmień" class="button" /></td>
												<td></td>
											</tr>					
										</table>
									</form>
								</div>
								
								<div id="change_faculty" class = "change_data_div">
									<form method="post" method="user_panel.php">
										<table>
												<tr>
													<td><label for="s_faculty" class="label">Nowy wydział</label></td>
													<td>
														<select id="s_faculty" name="s_faculty" class="select">
															<option selected="selected">--Wybierz wydział--</option>
															{foreach item=faculty from=$faculties}
																<option value="{$faculty.id}">{$faculty.name}</option>
															{/foreach}
														</select>
													</td>
												</tr>
												<tr>
													<td><label for="s_specialization" class="label"> Nowy kierunek</label></td>
													<td>
														<select id="s_specialization" name="s_specialization" class="select">
															<option selected="selected">--Wybierz kierunek--</option>					
														</select>
													</td>
												</tr>	
												<tr>
													<td><br/><input type="submit" name="submit_change_faculty" id="submit_change_faculty" value="Zmień" class="button" /></td>
													<td></td>
												</tr>
											</tr>				
										</table>	
									</form>
								</div>

								<div id="change_password" class = "change_data_div">
									<form method="post" action = "user_panel.php" >
										<table>
											<tr>
												<td><label for="new_password" class="label">Stare hasło</label></td>
												<td><input type="password" class="input" id="old_passwprd" name="old_password" /></td>
											</tr>
											<tr>
												<td><label for="new_password" class="label">Nowe hasło</label></td>
												<td><input type="password" class="input" id="new_passwprd" name="new_password" /></td>
											</tr>

											<tr>
												<td><br/><input type="submit" name="submit_change_password" id="submit_change_password" value="Zmień" class="button" /></td>
												<td></td>
											</tr>
										</table>
									</form>
								</div>
							</ul>
						</div>
					</li>  
				</ul>
			</li>
		</ul>
	</div>
</div>
</div>
{include file="footer.tpl"}